package IO;

import java.io.File;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86185
 * Date: 2023-08-02
 * Time: 16:21
 */
public class Demo1 {
    public static void main(String[] args) throws IOException {
        File file1 = new File("D:/text.txt");
        System.out.println(file1.getName());
        System.out.println(file1.getParent());
        System.out.println(file1.getPath());
        System.out.println(file1.getAbsolutePath());
        System.out.println(file1.getCanonicalPath());

        System.out.println("===========================");

        File file2 = new File("text.txt");
        System.out.println(file2.getName());
        System.out.println(file2.getParent());
        System.out.println(file2.getPath());
        System.out.println(file2.getAbsolutePath());
        System.out.println(file2.getCanonicalPath());
    }
}
